/**
 * Created by ste on 2018/1/17.
 */

import { autorun, observable, computed } from 'mobx';

export default function demo2() {
  const vaule = observable(0);
  const condition = computed(() => (vaule.get() >= 0));
  autorun(() => {
    console.log(`condition is ${condition.get()}`);
  });
  vaule.set(12);
  vaule.set(-3);
  vaule.set(5);
}
